package com.central.user.dao;

import com.central.user.model.AccountInfo;
import com.central.user.model.BlackListInfo;
import com.central.user.model.ServerInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;
@Mapper
public interface PlayerDao {

    @Select("select count(*) from account")
    public int getAccountCount();

    @Select("select count(*) from account where state = 1")
    public int getAccountCountByState();

    @Select("select serverId from account where playerId = #{playerId}")
    public int getServerId(@Param(value = "playerId")Long playerId);

    @Select("select * from urlconfig where serverId = #{serverId}")
    public ServerInfo getAreaServerInfo(@Param(value = "serverId")int serverId);

    public List<BlackListInfo> getBlackListAll(Map<String, Object> params);

    public List<AccountInfo> getPlayerAll(Map<String, Object> params);

}
